package com.yf.stack.invokevirtual;

interface Friendly {
    void sayHello();

    void sayGoodbye();
}

class Dog {
    public void sayHello() {
    }

    public String tostring() {
        return "Dog";
    }
}

class Cat implements Friendly {
    public void eat() {
    }

    public void sayHello() {
    }

    public void sayGoodbye() {
    }

    protected void finalize() {
    }
}

class cockerspaniel extends Dog implements Friendly {
    public void sayHello() {
        super.sayHello();
    }

    public void sayGoodbye() {
    }
}